/*
 * @Author: LCL 
 * @Date: 2018-03-08 14:08:41
 * @Desc: 类型数据
 */
import UIControl from "./UIControl";
import GameUIControl from "./GameUIControl";
import PlayerControl from "./PlayerControl";
import LadderControl from "./LadderControl";
import CameraControl from "./CameraControl";
import { PlayState } from "./LadderItemModel";



const {ccclass, property} = cc._decorator;

@ccclass
export default  class LadderData  {

    uiCtr : UIControl = null;
    gameUICtr : GameUIControl = null;
    playerCtr : PlayerControl = null;
    ladderCtr : LadderControl = null;
    cameraCtr : CameraControl = null;
    
    playState : PlayState = PlayState.PLAY_READY;
     


    private static instance: LadderData = null;
    static getInstance(): LadderData {
        if (this.instance == null) {
            this.instance = new LadderData();

            this.instance.uiCtr = cc.find("Canvas").getComponent(UIControl);
            this.instance.gameUICtr = cc.find("Canvas").getComponent(GameUIControl);
            this.instance.ladderCtr = cc.find("Canvas").getComponent(LadderControl);
            this.instance.playerCtr = cc.find("Canvas/MoveNode/map/Player").getComponent(PlayerControl);
            this.instance.cameraCtr = cc.find("Canvas").getComponent(CameraControl); 
        }
        return this.instance;
    }
    constructor() {
        
    }

    //改变战斗状态
    changePlayState(state : PlayState){
        this.playState = state;
    }
   
  


}



/*
public void TEXT1() 
{
	int textNum = 1;
	if (textNum == 1) 
	{
		textNum = 2;
    }
}
public void TEXT2()
{
    int textNum = 1;
    if (textNum == 1)
    {
        textNum = 2;
    }
}
public void TEXT3()
{
    int textNum = 1;
    if (textNum == 1)
    {
        textNum = 2;
    }
}

public void TEXT4()
{
    int textNum = 1;
    if (textNum == 1)
    {
        textNum = 2;
    }
}

public void TEXT5()
{
    int textNum = 1;
    if (textNum == 1)
    {
        textNum = 2;
    }
}

public void TEXT6()
{
    int textNum = 1;
    if (textNum == 1)
    {
        textNum = 2;
    }
}

public void TEXT8()
{
    int textNum = 1;
    if (textNum == 1)
    {
        textNum = 2;
    }
}

public void TEXT9()
{
    int textNum = 1;
    if (textNum == 1)
    {
        textNum = 2;
    }
}

public void TEXT10()
{
    int textNum = 1;
    if (textNum == 1)
    {
        textNum = 2;
    }
}

public void TEXT11()
{
    int textNum = 1;
    if (textNum == 1)
    {
        textNum = 2;
    }
}

public void TEXT12()
{
    int textNum = 1;
    if (textNum == 1)
    {
        textNum = 2;
    }
}

public void TEXT13()
{
    int textNum = 1;
    if (textNum == 1)
    {
        textNum = 2;
    }
}

public void TEXT14()
{
    int textNum = 1;
    if (textNum == 1)
    {
        textNum = 2;
    }
}

public void TEXT15()
{
    int textNum = 1;
    if (textNum == 1)
    {
        textNum = 2;
    }
}

public void TEXT16()
{
    int textNum = 1;
    if (textNum == 1)
    {
        textNum = 2;
    }
}

public void TEXT17()
{
    int textNum = 1;
    if (textNum == 1)
    {
        textNum = 2;
    }
}
*/